home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
MiscKit1.7.1
/
MiscKitArchive.mbox
/
mbox
/
000103_yackd@alaska.et.byu.edu_Tue Feb 1 14:39 MST 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-10-30
|
5KB
Received: from yvax.byu.edu by maine.et.byu.edu; Tue, 1 Feb 1994 14:39:42 -0700
Return-Path: <yackd@alaska.et.byu.edu>
Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-3 #4169)
id <01H8DI57FFDC02HXLO@yvax.byu.edu>; Tue, 1 Feb 1994 14:39:20 MST
Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-3 #4169)
id <01H8DI4ATV4002I1QC@yvax.byu.edu>; Tue, 1 Feb 1994 14:38:35 MST
Received: from yvax.byu.edu by alaska.et.byu.edu; Tue, 1 Feb 1994 14:37:31 -0700
Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-3 #4169)
id <01H8DI2L8Z1S02HXSD@yvax.byu.edu>; Tue, 1 Feb 1994 14:37:12 MST
Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-3 #4169)
id <01H8DI2DJX3402HZCF@yvax.byu.edu>; Tue, 1 Feb 1994 14:37:02 MST
Received: by alaska.et.byu.edu; Tue, 1 Feb 1994 14:36:51 -0700
Date: Tue, 01 Feb 1994 14:36:51 -0700
From: yackd@alaska.et.byu.edu (Don Yacktman)
Subject: Re: how about a misckit MiscDocument object?
To: misckit@byu.edu
Message-Id: <9402012136.AA24956@alaska.et.byu.edu>
Content-Transfer-Encoding: 7BIT
Status: RO
> I wonder if anyone has given any thoughts to writing some sort of
> MiscDocument object to facilitate the writing of multi-window
> multi-document applications.
I have! :-) I've come up with quite a few miscellaneous ideas
about what I'd like to see and how I'd go about getting them to
happen. However, I'm pretty busy with a lot of things right now
so I haven't got around to documenting any of these ideas...
> [...ideas...]
That's pretty close to what I was thinking of. You have a
DocumentController object to handle the top level stuff, like
creating new documents and keeping track of opened documents.
It would also keep the menu items up to date (enable/disable),
querying the active document if necessary. It might also be
nice to have some hooks in it that work with the up and
coming inspector stuff so that it is easy to have an inspector
that is dynamically kept up to date.
Next level down is a Document class that contains all the
things necessary for a document to do it's thing; the controller
is in the main .nib, but the Document is in the .nib loaded
to create a new document. It has a delegate that can load
and save a file, given a file name. Probably you want to
also specify a file type to save as...and whether or not to
keep a backup file (the xxx~ stuff). Actually, that could be
handled by the Document class itself. Maybe the best way to
do this is to have the delegate respond to:
- saveDataType:(int)typeTag toStream:(NXStream *)aStream;
- loadDataType:(int)typeTag fromStream:(NXStream *)aStream;
We might need a couple of other delegate methods to make sure
that the document can be made key (the delegate would forward
this to the appropriate view if it isn't a view, for example)
and other such things, maybe a -finishLoading type of method
or something like that, to init a document that's just been
loaded from disk.
So, yes, I have given it a little thought. For reference you
might find the FileSaverAndRetriever object (or something akin
to that name) on ftp.alleg.edu somewhat interesting. It's
more or less the Document class mentioned above, with a delegate
to handle the guts of load/save. I think a little more could
be added to it, though.
Well, the Info men and Preferences systems are my priority at
the moment. If I finish them before someone starts on this
project, then I'll take up this one next. If someone wants to
write these guys now, go right ahead. (Steve? :-) ) I'd be
happy to lend what little assistance I can to the effort.
> In the MiscKit Authors.rtf file, Don says he's working on a
> MiscInfoController. That would blend in very nicely with something
> like a MiscDocumentController.
Yup. Info, Prefs, Docs, all very useful extensions of the
AppKit. The sort of thing you'd have thought would be in
there already with a name like "AppKit". Well, I guess they
need a "some assembly required" label. :-) (Truer than some
suspect, when you have to go in and disassemble bits of the
AppKit to figure out how to subclass a class that NeXT didn't
document very well... :-( )
Well, let's put this on the To-Do list, then.
Or the in progress list; that would b even better. :-)
> P.S. Thank you Don for the latest release of the kit! MiscString
> in particular is saving me a lot of time.
It's a pleasure! I'm really glad to see it help someone besides
me. Believe me, all my major (and even not so major) projects
link against the MiscKit. It permeates all my stuff...and the
whole reason for making it public is so that others can benefit
as I have. :-) Oh, and with all the contributions that have
come in, I think the level of benefit to everyone will increase
dramatically. I'm now accepting submissions for the next release,
so let's have 'em, eh?
Later,
-don